﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using VOL.Core.Utilities;
using VOL.Entity.DomainModels;
using VOL.Smartmanufacturing.IServices.WatchedPlatform;

namespace VOL.WebApi.Controllers.Smartmanufacturing
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class WatchedPlatformController : ControllerBase
    {
        /// <summary>
        /// 工单台账服务
        /// </summary>
        private readonly IWatchedPlatformService _watchedPlatformService;
        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="watchedPlatformService">工单台账服务</param>
        public WatchedPlatformController(IWatchedPlatformService watchedPlatformService)
        {
            _watchedPlatformService = watchedPlatformService;
        }
        /// <summary>
        /// 获取工单台账列表
        /// </summary>
        /// <param name="tcketsLedger">工单台账</param>
        /// <returns>返回任务</returns>
        [HttpGet]
        public async Task<WebResponseContent> GetTicketsLedger()
        {
            return await _watchedPlatformService.GetTicketsLedger();
        }
        //// <summary>
        /// 获取生产维护列表
        /// </summary>
        /// <returns>返回任务</returns>
        [HttpGet]
        public async Task<WebResponseContent> GetMaintenance()
        {
            return await _watchedPlatformService.GetMaintenance();
        }
        //// <summary>
        /// 获取班组列表
        /// </summary>
        /// <returns>返回任务</returns>
        [HttpGet]
        public async Task<WebResponseContent> GetTeamQuery()
        {
            return await _watchedPlatformService.GetTeamQuery();
        }
    }
}
